home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 June / EnigmA AMIGA RUN 08 (1996)(G.R. Edizioni)(IT)[!][issue 1996-06][EARSAN CD VII].iso / earcd / texts / hsc.lha / hsc / src_docs / features / absuris.hsc next >
Text File  |  1996-01-08  |  1KB  |  35 lines

  1. <WEBPAGE chapter="hsc - Features - " title="Absolute URIs"
  2.     PREV="checkuri.html"
  3.     NEXT=":macro/macros.html">
  4.  
  5. <P>Sometimes, when your project starts to become rather complex,
  6. you create subdirectories for to structure the whole thing.</P>
  7.  
  8. <P>As example, I prefer to create a directory <CODE>image/</CODE>,
  9. where all images for buttons and logos are placed.</P>
  10.  
  11. <P>Creating a link to an image from the main-directory is no
  12. problem, it's URI simply is <FILE>image/logo.gif</FILE>.</P>
  13.  
  14. <P>But if your current page is somewhere deeper in your project-path,
  15. eg <FILE>people/hugo/hugo.html</FILE>, you need to refer to the
  16. same image using <FILE>../../image/logo.gif</FILE>. So you always
  17. have to know the directory-level of your current page.</P>
  18.  
  19. <P>This is not only annoying: Inside a macro, you are not able to
  20. find out where the file calling the macro is located!</P>
  21.  
  22. <P>One solution would be to define a <TG>BASE="[path to main document]"</TG>.
  23. But then, all your links have to be absolute. This is very annoying
  24. if you need to refer to files located in the same directory.</P>
  25.  
  26. <P>But, thanks to <hsc>, here's the solution to this problem: if you
  27. don't define a <TG>BASE</TG>-URI, all relative links are
  28. processed as usual. Only if the URI starts with a colon (":"), it
  29. refers to a file relative to the main-path of your project.</P>
  30.  
  31. <* TODO: example *>
  32.  
  33. </WEBPAGE>
  34.  
  35.